<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('用工统计列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                        	<li>
								<label>时间： </label>
								<input type="text" class="time-input" th:value="${time}" id="timeAt" name="timeAt" placeholder="开始时间" />
							</li>
                            <li>
                                <label>出工人员：</label>
                                <input type="text" name="peopleName"/>
                            </li>
                            <li>
                                <label>联系电话：</label>
                                <input type="text" name="phone"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
            	<a class="btn btn-success" onclick="monthDetail()" >
                    <i class="fa fa-plus"></i> 查看当月详情
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="gcgl:kqygtj:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="gcgl:kqygtj:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var removeFlag = [[${@permission.hasPermi('gcgl:kqygtj:remove')}]];
        var prefix = ctx + "gcgl/kqygtj";

        $(function() {
            var options = {
                url: prefix + "/list",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "用工统计",
                sortName: "updateat desc",
                sortOrder: "",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: '主键',
                    visible: false
                },
                {
                    field: 'gysptProjectid',
                    title: '合同ID',
                    visible: false
                },
                {
                    field: 'projectName',
                    title: '工程名称'
                },
                {
                    field: 'peopleId',
                    title: '出工人员ID',
                    visible: false
                },
                {
                    field: 'peopleName',
                    title: '出工人员'
                },
                {
                    field: 'year',
                    title: '年'
                },
                {
                    field: 'month',
                    title: '月'
                },
                {
                    field: 'day',
                    title: '日'
                },
                {
                    field: 'suosbz',
                    title: '所属班组'
                },
                {
                    field: 'gongz',
                    title: '工种'
                },
                {
                    field: 'rx',
                    title: '日薪',
                    visible: false
                },
                {
                    field: 'jzrq',
                    title: '结账日期',
                    visible: false
                },
                {
                    field: 'jzje',
                    title: '结账金额',
                    visible: false
                },
                {
                    field: 'jkrName',
                    title: '结款人姓名',
                    visible: false
                },
                {
                    field: 'memo',
                    title: '备注',
                    visible: false
                },
                {
                    field: 'status',
                    title: '状态',
                    visible: false
                },
                {
                    field: 'createUser',
                    title: '创建人'
                },
                {
                    field: 'createAt',
                    title: '创建时间'
                },
                {
                    field: 'updateUser',
                    title: '修改人',
                    visible: false
                },
                {
                    field: 'updateAt',
                    title: '修改时间',
                    visible: false
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
        
        function monthDetail(){
            $.modal.openTab('当月考勤详情',"/gcgl/kqygtj/ygtjPeoplePrint/"+$("#timeAt").val());
        }
        
    </script>
</body>
</html>